package org.hotelsystem.hoteladminsystem.Controller;

import org.hotelsystem.hoteladminsystem.Service.LiuyanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/liuyan")
public class LiuyanController {
    @Autowired
    private LiuyanService liuyanService;

    @RequestMapping("/getLiuyansByHotelId")
    public Map<String, Object> getLiuyansByHotelId(@RequestParam("hotelId") int hotelId) {
        return liuyanService.getLiuyanAndUserByhotelId(hotelId);
    }
}
